package com.dingwen.treasure.jpa.service.impl;

import com.dingwen.treasure.jpa.dao.QuartzLogDao;
import com.dingwen.treasure.jpa.service.QuartzLogService;
import com.dingwen.treasure.model.entity.jpa.QuartzLog;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

/**
 * 定时任务日志： 服务实现类
 *
 * @author dingwen
 * @date 2022/05/09
 */
@Service
@RequiredArgsConstructor
public class QuartzLogServiceImpl implements QuartzLogService {

    /**
     * quartz  log
     */
    private final QuartzLogDao quartzLogDao;

    /**
     * 存储日志
     *
     * @param quartzLog 石英测井
     */
    @Override
    public void save(QuartzLog quartzLog) {
        quartzLogDao.save(quartzLog);
    }

    /**
     * 无条件分页查询
     *
     * @param pageable
     * @return
     */
    @Override
    public Page<QuartzLog> page(Pageable pageable) {
        return quartzLogDao.findAll(pageable);
    }
}
